package com.loop;

/*
鸡兔同笼
*/
public class Demo06 {
    public static void main(String[] args) {
        int rabit=0;
        while (true){
            rabit++;
            int chken=rabit+20;
            if (rabit*4-chken*2==200){
                System.out.println("兔子的数量为："+rabit+"只");
                System.out.println("坤子的数量为："+chken+"只");
                break;
            }
        }

    }
}
